< previous page page_27 next page >

Page 27
Table 1.3 Examples of Text Box Events.
Event NameDescription
GotFocusThe text box receives input focus.
KeyPressA key is pressed.
LostFocusThe text box loses input focus.
ChangeText changes via user input or code.

Message Queue
Each message thats generated is put into a queue. Windows manages this queue on a first-in, first-out basis. Windows is responsible for dispatching messages to the appropriate object that has focus, or Windows may determine that the message is for another object and give it focus.
Focus
A computer has only a limited set of devices: one keyboard, one screen, one mouse, and a few COM and printer ports that all programs must share. When dealing with data input, Windows gives a visual clue to you about which window has focus. To show that the keyboard will affect a specified window, Windows changes the title bar of the window. To show that the keyboard can type into a textbox, Windows places a blinking bar in the text box (called the caret). There are other indications of focus, depending on the type of window or control. In general, focus usually indicates which window or part of a window the input device will interact with.
Summary
This chapter introduced you to the Visual Basic language. You learned about the different types of applications you can create using Visual Basic. You also learned a little of the history of Visual Basic. In addition, you learned about the Windows operating system. Developing event-driven programs for the Windows environment is very different than developing programs for a procedural environment. Given the wide variety of applications you can create with Visual Basic, its no wonder Visual Basic is the number one language of choice for developing event-driven Windows applications.

 
< previous page page_27 next page >

If you like this book, buy it!